GDK_AVAILABLE_IN_ALL
GdkDragContext * gdk_drag_begin (GdkWindow *window,
- GdkContentFormats *formats);
-
-GDK_AVAILABLE_IN_ALL
-GdkDragContext * gdk_drag_begin_for_device (GdkWindow *window,
- GdkDevice *device,
- GdkContentFormats *formats);
-GDK_AVAILABLE_IN_3_20
-GdkDragContext * gdk_drag_begin_from_point (GdkWindow *window,
GdkDevice *device,
GdkContentFormats *formats,
gint x_root,
/**
* gdk_drag_begin:
- * @window: the source window for this drag.
- * @formats: (transfer none): the offered formats
- *
- * Starts a drag and creates a new drag context for it.
- * This function assumes that the drag is controlled by the
- * client pointer device, use gdk_drag_begin_for_device() to
- * begin a drag with a different device.
- *
- * This function is called by the drag source.
- *
- * Returns: (transfer full): a newly created #GdkDragContext
- */
-GdkDragContext *
-gdk_drag_begin (GdkWindow *window,
- GdkContentFormats *formats)
-{
- GdkDisplay *display;
- GdkDevice *device;
-
- display = gdk_window_get_display (window);
- device = gdk_seat_get_pointer (gdk_display_get_default_seat (display));
-
- return gdk_drag_begin_for_device (window, device, formats);
-}
-
-/**
- * gdk_drag_begin_for_device:
- * @window: the source window for this drag
- * @device: the device that controls this drag
- * @formats: (transfer none): the offered formats
- *
- * Starts a drag and creates a new drag context for it.
- *
- * This function is called by the drag source.
- *
- * Returns: (transfer full): a newly created #GdkDragContext
- */
-GdkDragContext *
-gdk_drag_begin_for_device (GdkWindow *window,
- GdkDevice *device,
- GdkContentFormats *formats)
-{
- gint x, y;
-
- gdk_device_get_position (device, &x, &y);
-
- return gdk_drag_begin_from_point (window, device, formats, x, y);
-}
-
-/**
- * gdk_drag_begin_from_point:
* @window: the source window for this drag
* @device: the device that controls this drag
* @formats: (transfer none): the offered formats
* This function is called by the drag source.
*
* Returns: (transfer full): a newly created #GdkDragContext
- *
- * Since: 3.20
*/
GdkDragContext *
-gdk_drag_begin_from_point (GdkWindow *window,
- GdkDevice *device,
- GdkContentFormats *formats,
- gint x_root,
- gint y_root)
+gdk_drag_begin (GdkWindow *window,
+ GdkDevice *device,
+ GdkContentFormats *formats,
+ gint x_root,
+ gint y_root)
{
return GDK_WINDOW_IMPL_GET_CLASS (window->impl)->drag_begin (window, device, formats, x_root, y_root);
}
else
gdk_device_get_position (pointer, &start_x, &start_y);
- context = gdk_drag_begin_from_point (ipc_window, pointer, target_list, start_x, start_y);
+ context = gdk_drag_begin (ipc_window, pointer, target_list, start_x, start_y);
gdk_drag_context_set_device (context, pointer);